<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="/static/css/bootstrap.css">
    <title>留言本</title>
</head>
<body>
<div class="container">
    {include file='index/header' /}
    <div class="card text-left mt-2">
        <div class="card-header">留言本开发</div>
        <div class="card-body">
            <a class="btn btn-primary" href="/addmessage">添加留言</a>
            <form action="/index/index/search" method="post">
                <input type="text" class="form-control" name="keywords" style="width: 400px">
                <button type="submit" class="btn btn-primary">搜索</button>
            </form>
            <table class="table mt-2">
                <thead>
                <tr>
                    <th scope="col">ID</th>
                    <th scope="col">内容</th>
                    <th scope="col">发布时间</th>
                    <th scope="col">操作</th>
                </tr>
                </thead>
                <tbody>
                {volist name='res' id='v'}
                <tr>
                    <th scope="row">{$v.id}</th>
                    <td>{$v.content}</td>
                    <td>{$v.create_time}</td>
                    <td>
                        <a href="/index/index/edit?id={$v.id}" class="btn btn-sm btn-primary">修改</a>
                        <a href="/index/index/del?id={$v.id}" class="btn btn-sm btn-danger">删除</a>
                    </td>
                </tr>
            {/volist}
                </tbody>
            </table>
        </div>
    </div>
</div>
</body>
</html>